<template>
  <div class="my-input">
    <el-input
      v-model="input"
      :placeholder="ph"
      :style="'width:' + width + 'px'"
    ></el-input>
  </div>
</template>

<script>
export default {
  props: ["ph", "width", "value"],
  created () {
    this.input = this.value
  },
  data() {
    return {
      input: "",
    };
  },
  watch: {
    input() {
      this.$emit("value", this.input);
    },
  },
};
</script>

<style>
.my-input .el-input__inner {
  background-color: #f2f2f2;
  border: none;
  font-family: "ArialMT", "Arial", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  letter-spacing: normal;
}

.my-input ::-webkit-input-placeholder {
  color: rgb(153, 153, 153);
  font-family: "ArialMT", "Arial", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  letter-spacing: normal;
}
</style>